package cms.simmytech.util;

import java.util.HashMap;
import java.util.Map;

public class ResultCode {

	public static Map<Integer, String> RESULTMAP = new HashMap<Integer, String>();

	/*
	 * 通用返回码
	 */
	public static final int SUCCESS = 10000;

	public static final int INVALID_PARAMETER = 10001;

	public static final int SERVER_ERROR = 10002;

	public static final int OPERATION_ERROR = 10003;

	public static final int NO_RESULT = 10004;

	public static final int INVALID_TOKEN = 10005;

	public static final int RESULT_EXIST = 10006;

	public static final int INVALID_STORE = 10007;

	public static final int ALI_EXIST = 10008;

	public static final int NO_MORE_RESULT = 10009;

	public static final int USER_MESSAGE_OVERTIME = 10106;

	public static final int USER_CODE_ERROR = 10107;

	/*
	 * 用户
	 */
	public static final int USER_NO_EXIST = 10101;

	public static final int USER_AUTH_ERROR = 10102;

	public static final int USER_WRONG_PASSWORD = 10103;

	public static final int USER_EXIST = 10104;

	public static final int USER_MONEY_ZERO = 10105;

	public static final int USER_NOT_ENOUGH_POINT = 10106;

	public static final int USER_NOT_AUTHORITY = 10112;

	public static final int USER_NOT_OPEN = 10113;

	public static final int RESTAURANT_WIFI_FEIE_PRINTER_ERROR = 10107;

	public static final int RESTAURANT_WIFI_FEIE_PRINTER_PRINT_ERROR = 10108;

	public static final int CONTENT_OVER_LENGTH = 10109;

	public static final int CONTENT_CENSOR_WORD = 10110;

	public static final int USER_FORBIDDEN = 10111;

	public static final int USER_COMPANY_EXIST = 10112;

	public static final int ILLEGAL_PERMISSIONS = 10113;

	public static final int ALREADY_USED = 10114;

	/*
	 * 商品
	 */

	public static final int WECHAT_UNIFIEDORDER = 10202;

	public static final int VM_NAME_EXIST = 200501;

	/*
	 * 家谱排行已存在
	 */
	public static final int GENE_RANK_EXIST = 10301;

	public static final int GENE_NOT_EXIST = 10302;

	public static final int USER_ADDRESS_DEFAULT_NO_EXIST = 20301;

	// 团购无效
	public static final int BOOK_EXIST = 10401;

	public static final int GROUPON_GROUNP_INVALID = 10402;

	public static final int GROUPON_GROUNP_WRONG = 10403;

	public static final int GROUPON_GROUNP_ADDED = 10404;

	public static final int GROUPON_ORDER_ERROR = 10405;

	/*
	 * 商品
	 */

	public static final int COLLECT_GOODS_NO_EXIST = 10402;

	public static final int PAY_ERROR = 10501;

	public static final int ORDER_NO_EXIST = 10601;

	public static final int ORDER_UN_SHIPPING = 10602;

	public static final int ORDER_SHIPPING_ERROR = 10603;

	public static final int ORDER_REFUND_ERROR = 10604;

	public static final int ADDRESS_USER_INVALID = 10701;

	public static final int ADDRESS_USER_OUTOFRANGE = 10703;

	public static final int ORDER_RESTAURANT_CLOSE = 10702;

	public static final int ORDER_STATE_ERROR = 10704;

	public static final int ORDER_CALL_RESTAURANT = 10705;

	public static final int ORDER_CANCEL_ERROR = 10706;

	public static final int GOODS_SPECS_ERROR = 10707;

	/*
	 * 微信校验
	 */
	public static final int CODE2SESSION_BUSY = 11001;

	public static final int CODE2SESSION_SUCCESS = 11002;

	public static final int CODE2SESSION_INVALID_CODE = 11003;

	public static final int USER_INVALID_CODE = 40029;
	public static final int PRICE_CODE = 40030;
	public static final int PRICE_MIN_CODE = 40031;

	static {

		// 公用返回值
		RESULTMAP.put(SUCCESS, "成功");
		RESULTMAP.put(INVALID_PARAMETER, "参数异常");
		RESULTMAP.put(SERVER_ERROR, "服务器异常");
		RESULTMAP.put(OPERATION_ERROR, "操作失败");
		RESULTMAP.put(NO_RESULT, "无记录");
		RESULTMAP.put(INVALID_TOKEN, "您的账号易在其他设备上登录，请注意账号安全");
		RESULTMAP.put(NO_MORE_RESULT, "无更多记录");

		RESULTMAP.put(USER_NO_EXIST, "无此用户");
		RESULTMAP.put(USER_WRONG_PASSWORD, "用户名或密码错");
		RESULTMAP.put(USER_AUTH_ERROR, "用户校验失败");
		RESULTMAP.put(USER_EXIST, "手机号已存在");
		RESULTMAP.put(USER_MONEY_ZERO, "余额不足");
		RESULTMAP.put(USER_NOT_ENOUGH_POINT, "用户积分不足");
		RESULTMAP.put(USER_ADDRESS_DEFAULT_NO_EXIST, "无默认地址");
		RESULTMAP.put(USER_FORBIDDEN, "您已被禁言,如需恢复请与管理员联系");
		RESULTMAP.put(USER_CODE_ERROR, "验证码有误");
		RESULTMAP.put(RESTAURANT_WIFI_FEIE_PRINTER_ERROR, "添加飞鹅打印机失败");
		RESULTMAP.put(RESTAURANT_WIFI_FEIE_PRINTER_PRINT_ERROR, "飞鹅打印机打印失败");
		RESULTMAP.put(CONTENT_OVER_LENGTH, "正文内容超长");
		RESULTMAP.put(CONTENT_CENSOR_WORD, "内容包含敏感字,不能发布");
		RESULTMAP.put(USER_MESSAGE_OVERTIME, "短信发送超过次数");
		RESULTMAP.put(USER_NOT_AUTHORITY, "无权查看信息");
		RESULTMAP.put(USER_NOT_OPEN, "用户未公开信息");
		RESULTMAP.put(USER_COMPANY_EXIST, "单位管理员已存在");
		RESULTMAP.put(ILLEGAL_PERMISSIONS, "操作权限非法");
		RESULTMAP.put(ALREADY_USED, "已经采用无法撤回");

		RESULTMAP.put(BOOK_EXIST, "家谱已经存在");
		RESULTMAP.put(GROUPON_GROUNP_INVALID, "团购组无效");
		RESULTMAP.put(GROUPON_GROUNP_WRONG, "团购组状态异常");
		RESULTMAP.put(GROUPON_GROUNP_ADDED, "已经加入团购");
		RESULTMAP.put(GROUPON_ORDER_ERROR, "插入订单无效");

		RESULTMAP.put(ADDRESS_USER_OUTOFRANGE, "不再送货范围");

		RESULTMAP.put(BOOK_EXIST, "商品已售出");
		RESULTMAP.put(WECHAT_UNIFIEDORDER, "统一下单失败");
		RESULTMAP.put(VM_NAME_EXIST, "云主机名已存在");

		RESULTMAP.put(GENE_RANK_EXIST, "家谱排行已存在");
		RESULTMAP.put(GENE_NOT_EXIST, "家谱不存在");

		RESULTMAP.put(ORDER_NO_EXIST, "订单不存在");
		RESULTMAP.put(ORDER_UN_SHIPPING, "尚未发货");
		RESULTMAP.put(ORDER_SHIPPING_ERROR, "查询物流失败");
		RESULTMAP.put(ORDER_REFUND_ERROR, "退单失败");
		RESULTMAP.put(ORDER_STATE_ERROR, "订单状态异常");
		RESULTMAP.put(ORDER_CALL_RESTAURANT, "商家已接单,请与商家联系");
		RESULTMAP.put(ORDER_CANCEL_ERROR, "退单失败");
		RESULTMAP.put(GOODS_SPECS_ERROR, "商品型号错误请重新选择");

		RESULTMAP.put(ADDRESS_USER_INVALID, "无权查看该地址");

		RESULTMAP.put(USER_INVALID_CODE, "系统繁忙");
		RESULTMAP.put(CODE2SESSION_SUCCESS, "请求成功");
		RESULTMAP.put(CODE2SESSION_INVALID_CODE, "code 无效");

		RESULTMAP.put(ORDER_RESTAURANT_CLOSE, "不在营业时间");

		RESULTMAP.put(ORDER_RESTAURANT_CLOSE, "不在营业时间");

		RESULTMAP.put(USER_INVALID_CODE, "invalid code");
		RESULTMAP.put(PRICE_CODE, "退款金额不能大于订单金额");
		RESULTMAP.put(PRICE_MIN_CODE, "退款金额不能是负数");

	}

}
